<template>
  <div>
    <!--点击删除按钮后弹出的页面-->
    <div class="zhezhao" :style="{display: show}"></div>
    <div class="remove" id="removeBi" :style="{display: show}">
      <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
          <p>你确定要删除该订单吗？</p>
          <a href="#" id="yes" @click="handleYesOrNo(true)">确定</a>
          <a href="#" id="no" @click="handleYesOrNo(false)">取消</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'modal-box',
  props: ['show'],
  methods: {
    handleYesOrNo (flag) {
      this.$emit('handleResult', flag)
    }
  }
}
</script>

<style>
  /*点击删除按钮后弹出的层*/
  .zhezhao {
    display: none;          /* 修改这里可以让遮罩层消失*/
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.7;
    filter: alpha(opacity=70);
    overflow: hidden;
  }
  .remove{
    display: none;       /* 修改这里可以让删除框消失*/
    width: 400px;
    height: 190px;
    position: absolute;
    top: 200px;
    left:500px;
    background: #fff;
    border-radius: 4px;
  }
  .removerChid{
    margin: 4px;
    border: 1px solid #ccc;
  }
  .removerChid h2{
    padding-left: 8px;
    font-size: 14px;
    line-height: 30px;
    margin: 4px 8px;
    border-bottom: 1px solid #99cc33;
  }
  .removeMain{
    margin-top: 38px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 4px;
  }
  .removeMain a{
    padding: 0 20px;
    display: inline-block;
    height: 30px;
    line-height: 30px;
    border-radius: 4px;
    border: 1px solid #5e8809;
    margin-top: 30px;
    background: #99cc33;
    color: #fff;
  }
  .removeMain a:hover,.removeMain a:active{
    background: #679016;

  }
</style>
